import request from '@/utils/request'

export interface LoginForm {
  username: string
  password: string
}

export const login = async (loginForm: LoginForm) => {
  return request
    .post('/auth/login', {
      username: loginForm.username,
      password: loginForm.password,
    })
    .then((res: any) => {
      return res
    })
}
